<template>
  <div class="list">
    <div v-show="itemObj.channel_info.name=='资深讲师'">
      <div class="title">{{itemObj.channel_info.name}}</div>
      <div @click="$router.push(`/teacherDetail?id=${item.teacher_id}`)" v-for="(item,index) in itemObj.list" :key="index" class="list_item">
        <img :src="item.teacher_avatar" alt />
        <section>
          <p style="font-size:18px">{{item.teacher_name}}</p>
          <span>{{item.introduction}}</span>
        </section>
      </div>
    </div>
    <div v-show="itemObj.channel_info.name=='推荐课程'">
      <div class="title">{{itemObj.channel_info.name}}</div>
      <div class="list2" v-for="(item,index) in itemObj.list" :key="index">
        <p>{{item.title}}</p>
        <p style="color:#999999;font-size:20px;margin-top:5px">共点击量</p>
        <img :src="item.cover_img" alt />
        <div class="price">
          <span style="color:#999999;font-size:20px">{{item.id}} 人报名</span>
          <span style="color:red;font-size:22px">{{item.underlined_price}}.00</span>
        </div>
      </div>
    </div>
    <div v-show="itemObj.channel_info.name=='名师'">
      <div class="title">{{itemObj.channel_info.name}}</div>
      <div @click="$router.push(`/teacherDetail?id=${item.teacher_id}`)" v-for="(item,index) in itemObj.list" :key="index" class="list_item">
        <img :src="item.teacher_avatar" alt />
        <section>
          <p style="font-size:18px">{{item.teacher_name}}</p>
          <span>{{item.introduction}}</span>
        </section>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    itemObj: Object
  },
  setup(props) {
   
  }
};
</script>
<style lang="scss" scoped>
.title {
  border-left: 5px solid #ff0000;
  padding-left: 15px;
  margin-top: 5px;
  font-size: 24px;
}
.list_item {
  display: flex;
  height: 125px;
  background: #fff;
  margin-top: 10px;
  align-items: center;
  padding: 0 10px;
  img {
    width: 57px;
    height: 57px;
    border-radius: 50%;
  }
  section {
    margin-left: 15px;
    p {
      margin-bottom: 10px;
    }
    span {
      font-size: 14px;
      color: #999999;
    }
  }
}
.list2 {
  background: #fff;
  margin-top: 10px;
  padding: 10px;
  img{
    width: 100px;
    height: 100px;
  }
  .price {
    display: flex;
    justify-content: space-between;
  }
}
</style>